package com.ssy.lingxi.platform.manage.entity.content;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 图片实体类
 * @author fhj
 * @version 2.0.0
 * @date 2020/9/17
 */
@Data
@Entity
@Table(schema = "public", name = "man_content_image")
public class ContentImage implements Serializable {
    private static final long serialVersionUID = 6426359509515101022L;

    @ApiModelProperty(value = "主键id")
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "content_image_seq")
    @SequenceGenerator(sequenceName = "man_content_image_seq", name = "content_image_seq", allocationSize = 1)
    private Long id;

    @ApiModelProperty(value = "图片名称")
    @Column(columnDefinition = "varchar(30)")
    private String name;

    @ApiModelProperty(value = "使用场景 1-WEB 2-APP")
    private Integer useScene;

    @ApiModelProperty(value = "所在位置 1-WEB登录页面 2-平台后台登录页面 3-APP引导页 4-APP启动页")
    private Integer position;

    @ApiModelProperty(value = "图片排序(所在位置为APP引导页时必须有值)")
    private Integer sort;

    @ApiModelProperty(value = "图片地址")
    private String imageUrl;

    @ApiModelProperty(value = "状态 0-无效 1-有效")
    private Integer status = 1;

    @ApiModelProperty(value = "创建时间")
    private Long createTime = System.currentTimeMillis();
}
